Repository navigation
test: keep the concurrent-session entry inside the 30-day state TTL - #112
Conversation
The test saved the other session's entry with a fixed date. save_hook_state drops entries older than 30 days, so from 2026-10-10 the entry was pruned and the test failed regardless of the change under test. Stamp it with the current time instead. Co-authored-by: hassieb.pakzad <hassieb.pakzad@clickhouse.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
LGTM. This is a one-line test fix that stops a hardcoded date from aging past the state TTL.
What was reviewed:
save_hook_stateinhooks/langfuse_hook.py(around line 601) drops entries older than 30 days. A2026-09-10stamp would have been pruned before the assertion ran, so stamping the entry with the current UTC time fixes the failure.datetimeandtimezoneare already imported on line 6, so no new import is needed. The new value uses the same format as the file's existing helper on line 14.
Extended reasoning...
The change touches one line in tests/integration/test_state_lock_contention.py: a test fixture's timestamp goes from a fixed date to the current UTC time. No production code changes, and there is no security-sensitive surface. The diff matches the 30-day cutoff in hooks/langfuse_hook.py, which explains why the old fixed date began failing. No CODEOWNERS file covers the path, and the PR timeline has no reviewer objections.
tests/integration/test_state_lock_contention.py::test_entry_of_another_session_survives_the_emithas been failing onmainand on every PR since 2026-10-10, whatever the change under test.The test saved another session's state entry with the fixed date
2026-09-10.save_hook_stateinhooks/langfuse_hook.pydrops entries older than 30 days, so the entry was pruned before the assertion ran. The test now stamps the entry with the current time.This is the only test failure on #108, so its CI should go green once this merges and it is re-run.
Verification
uv run --group dev pytest:279 passed(unmodifiedmain:1 failed, 278 passed)uvx ruff check --select F,E9 .:All checks passed!